<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>HowMuch Services API</title>
</head>
<body>
	<b>--- Metodos entidad User:</b>
	<br/>
	<br/>
	<br/>
	<b>------ Login</b>
	<br/>
	<p>Parametros: String username (req), String password (req)</p>
	<b>Ejemplo HttpRequest:</b>
	<br/>
	<br/> 
	<p>PUT http://ip:port/howmuch-services/user/login.json?username=gustavo&password=1234 HTTP/1.1</p>
	<p>Aclaracion: Se deberia utilizar https para cuando implementemos en prod.</p>
	<br/> 	
	<b>Ejemplo HttpResponse:</b>
	<br/>	
	<p>HTTP/1.1 200 OK</p>
	<p>Set-Cookie: JSESSIONID=66D52DB766E0FB3DE0BB347916CBCFF6; Path=/</p>
	<p>Content-Type: application/json</p>
	<p>{"status":"success"}</p>
	<br/>
	<br/>
	<br/>
	<b>------ Register</b>
	<br/>
	<p>Parametros: String username (req), String password (req), String name (req), String lastname (req), Date dateofbirth (req), String email (req)</p>
	<b>Ejemplo HttpRequest:</b>
	<br/>
	<br/> 
	<p>PUT http://ip:port/howmuch-services/rest/user/register.json?username=gustavo2&password=1234&name=Gusta&lastname=AAA&dateofbirth=27%2F10%2F1984&email=alv%40alv.com HTTP/1.1</p>
	<p>Aclaracion: Se deberia utilizar https para cuando implementemos en prod.</p>
	<br/> 	
	<b>Ejemplo HttpResponse:</b>
	<br/>	
	<p>HTTP/1.1 200 OK</p>
	<p>Content-Type: application/json</p>
	<p>{"status":"done"}</p>
	<br/>
	<br/>
	<br/>
	<b>------ Logout</b>
	<br/>
	<p>Parametros: N/A</p>
	<b>Ejemplo HttpRequest:</b>
	<br/>
	<br/> 
	<p>PUT http://ip:port/howmuch-services/rest/user/logout.json HTTP/1.1</p>
	<p>Cookie: JSESSIONID=7F84511D8BC3F4C191FC30F72E435E9B; Path=/</p>
	<br/> 	
	<b>Ejemplo HttpResponse:</b>
	<br/>	
	<p>HTTP/1.1 200 OK</p>
	<p>Content-Type: application/json</p>
	<p>{"status":"done"}</p>
	<br/>
	<br/>
	<br/>
	<b>------ Passwordrecovery</b>
	<br/>
	<p>Parametros: String username (req)</p>
	<b>Ejemplo HttpRequest:</b>
	<br/>
	<br/> 
	<p>GET http://ip:port/howmuch-services/rest/user/passwordrecovery.json?username=gustavo12 HTTP/1.1</p>
	<br/> 	
	<b>Ejemplo HttpResponse:</b>
	<br/>	
	<p>HTTP/1.1 200 OK</p>
	<p>Content-Type: application/json</p>
	<p>{"status":"done"}</p>
	<br/>
	<br/>
	<br/>
	<b>------ Update</b>
	<br/>
	<p>Parametros: String username (req), String password (req), String name (req), String lastname (req), Date dateofbirth (req), String email (req)</p>
	<b>Ejemplo HttpRequest:</b>
	<br/>
	<br/> 
	<p>PUT http://ip:port/howmuch-services/rest/user/update.json?username=gustavo&password=12345&name=Gustavo&lastname=Alvarez&dateofbirth=27%2F10%2F1984&email=alvgustavoe%40gmail.com HTTP/1.1</p>
	<p>Cookie: JSESSIONID=0F2145CA3F7C657595BF2AAD95742BB6; Path=/</p>
	<p>Aclaracion: Se deberia utilizar https para cuando implementemos en prod.</p>
	<br/> 	
	<b>Ejemplo HttpResponse:</b>
	<br/>	
	<p>HTTP/1.1 200 OK</p>
	<p>Content-Type: application/json</p>
	<p>{"status":"done"}</p>
	<br/>
	<br/>
	<br/>
	<b>------ Whoami</b>
	<br/>
	<p>Parametros: N/A</p>
	<b>Ejemplo HttpRequest:</b>
	<br/>
	<br/> 
	<p>GET http://ip:port/howmuch-services/rest/user/whoami.json HTTP/1.1</p>
	<p>Cookie: JSESSIONID=0F2145CA3F7C657595BF2AAD95742BB6; Path=/</p>
	<br/> 	
	<b>Ejemplo HttpResponse:</b>
	<br/>	
	<p>HTTP/1.1 200 OK</p>
	<p>Content-Type: application/json</p>
	<p>{"status":"gustavo, 2972187D01CC36128547F453F7DCAB3C"}</p>
	<br/>
	<br/>
	<br/>			
	<a href="../index.jsp">Volver</a>
</body>
</html>